<?php
class Dialogue_model extends CI_Model {
    
    
    public function __construct(){
        parent::__construct();
        $this->load->database();
    }
    
    public function getAllItems($lessonId){
    	if(empty($lessonId)){
    		return false;
    	}
    	$this->db->select('dic.*');
    	$this->db->from('zh_jp_dictionary as dic');
    	$this->db->join('sentence as st','st.sentence_id =dic.sentence_id','left');
		$this->db->where('st.lesson_id',$lessonId);
		$result=$this->db->get();
		$rs=$result->result_array();
		return $rs;
    	
    }
    
}